package com.fordmotor.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
@Data
@Component
public class GitHubConfig {

    private static String clientSecret;
    private static String clientId;
    private static String authorize;
    private static String callback;
    private static String accessToken;
    private static String gitUser;

    public static String getClientSecret() {
        return clientSecret;
    }
    @Value("${github.clientSecret}")
    public void setClientSecret(String clientSecret) {
        GitHubConfig.clientSecret = clientSecret;
    }

    public static String getClientId() {
        return clientId;
    }
    @Value("${github.clientId}")
    public void setClientId(String clientId) {
        GitHubConfig.clientId = clientId;
    }

    public static String getAuthorize() {
        return authorize;
    }
    @Value("${github.authorize}")
    public void setAuthorize(String authorize) {
        GitHubConfig.authorize = authorize;
    }

    public static String getCallback() {
        return callback;
    }
    @Value("${github.callback}")
    public  void setCallback(String callback) {
        GitHubConfig.callback = callback;
    }

    public static String getAccessToken() {
        return accessToken;
    }
    @Value("${github.accessToken}")
    public void setAccessToken(String accessToken) {
        GitHubConfig.accessToken = accessToken;
    }

    public static String getGitUser() {
        return gitUser;
    }
    @Value("${github.gitUser}")
    public void setGitUser(String gitUser) {
        GitHubConfig.gitUser = gitUser;
    }
}
